<script>
import { login } from "./server";
export default {
  onLaunch: function () {
    wx.login({
      success: async (res) => {
        // console.log(res,"00000000");
        // console.log(login,"0........");
        // console.log(res.code);
        let result = await login(res.code);
        // console.log(result);
     wx.setStorageSync("openid", result.data.openid);
      },
    });
  },
};
</script>

<style lang="scss">
/*每个页面公共css */
* {
  margin: 0;
  padding: 0;
  list-style: none;
  text-decoration: none;
}
html,
body {
  width: 100%;
  height: 100%;
}
</style>
